﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="gameAdmin.aspx.vb" Inherits="projectBiome.createGame" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    'Show add System Multiview
    Sub addGameShow(ByVal sender As Object, _
                     ByVal e As EventArgs)
        addModifyView.ActiveViewIndex = "1"
    End Sub
    
    'Show modify System MultiView
    Sub modifyGameShow(ByVal sender As Object, _
                     ByVal e As EventArgs)
        addModifyView.ActiveViewIndex = "0"
    End Sub

       
  
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        .style2
        {
            font-family: Calibri;
        }
        #Text1
        {
            width: 145px;
        }
        .style8
        {
            font-family: Calibri;
            background-color: #FFFFFF;
            width: 224px;
            text-align: left;
        }
        .style10
        {
            font-family: Calibri;
            text-align: center;
        }
        .style18
        {
            font-family: Calibri;
            width: 317px;
        }
        .style19
        {
            width: 317px;
            text-align: left;
            background-color: lightgreen;
        }
        .style25
        {
            width: 112px;
            height: 23px;
            background-color: lightgreen;
        }
        .style41
        {
            height: 23px;
            width: 222px;
            text-align: center;
            background-color: lightgreen;
        }
        #SystemNameModify
        {
            text-align: left;
        }
        .style54
        {
            height: 23px;
            width: 48px;
            text-align: center;
            background-color: lightgreen;
        }
        .style56
        {
            height: 23px;
            width: 112px;
            text-align: center;
            background-color: lightgreen;
        }
        .style57
        {
            width: 317px;
            text-align: left;
            background-color: lightgreen;
            height: 31px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="style2" style="text-align: center">
    
        <h1>
            Game Administration</h1>
    
    </div>
    <p style="background-color: lightgreen">
        <asp:LinkButton ID="linkHomelnkbtn" runat="server" 
            PostBackUrl="./indexAdmin.aspx">Index</asp:LinkButton>
&nbsp;&gt; Game Administration</p>
    <table style="width: 100%;">
        <tr>
            <td class="style10">
                <asp:ImageButton ID="addGameBtn" runat="server" 
                    ImageUrl="../images/addSystem.jpeg"  OnClick = "addGameShow" 
                    style="margin-left: 0px; text-align: center;" ToolTip="Add A New System" />
                <asp:ImageButton ID="modifyGameBtn" runat="server" OnClick = "modifyGameShow" Height="103px" 
                    ImageUrl="../images/modifySystem.jpeg" Width="113px" 
                    ToolTip="Modify System"/>
                <asp:ImageButton ID="returnBtn" runat="server"
                    ImageUrl="../images/backIcon.jpg" Width="89px" 
                    DescriptionUrl="./indexAdmin.aspx" />
            </td>
        </tr>
    </table>
    <asp:MultiView ID="addModifyView" runat="server" ActiveViewIndex="0">
        <asp:View ID="modifyGame" runat="server">
            <table style="width: 91%;">
                <tr>
                    <td style="text-align: center">
                        <h1 class="style8">
                            Modify Game</h1>
                    </td>
                </tr>
                <%--<tr>
                    <td class="style4">
                        <span class="style2">Choose System:</span><br />
                        <asp:DropDownList ID="SystemDropDown" runat="server" OnSelectedIndexChanged="selectIndexChanged"
                            DataSourceID="SqlDataSource1" DataTextField="SystemName" 
                            DataValueField="SystemID" Height="40px" AutoPostBack="True">
                            <asp:ListItem Value="1">Default</asp:ListItem>
                        </asp:DropDownList>
                        <br />
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:FA11_4396_allConnectionString %>" 
                            SelectCommand="SELECT [SystemName], [SystemID] FROM [System]">
                        </asp:SqlDataSource>
                    </td>
                    <td>
                        <asp:Panel ID="Panel1" runat="server" Height="244px" 
                            style="background-color: #FFFFFF; text-align: left;">
                            System Name:<br />
                            &nbsp;<asp:TextBox ID="systemNameModifyTxt" runat="server" AutoPostBack="True"></asp:TextBox>
                            <br />
                            <br />
                            <table style="width:100%;">
                                <tr>
                                    <td class="style34">
                                        <asp:ListBox ID="systemAttributeBox" runat="server" Width="236px" 
                                            SelectionMode="Multiple"></asp:ListBox>
                                    </td>
                                    <td class="style43">
                                        <asp:Button ID="moveAttribLeftBtn"  OnClick="moveLeftModify" runat="server" Text="&lt;&lt;" 
                                            style="text-align: center" />
                                        <br />
                                        <asp:Button ID="moveAttribRightBtn" OnClick="moveRightModify" runat="server" Text="&gt;&gt;" 
                                            style="text-align: center" />
                                        <br />
                                    </td>
                                    <td>
                                        <asp:ListBox ID="availableAttributeBox" runat="server" Width="273px"></asp:ListBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="style34">
                                        System Attributes</td>
                                    <td class="style43">
                                        &nbsp;</td>
                                    <td>
                                        Available Attributes</td>
                                </tr>
                                <tr>
                                    <td class="style34">
                                        &nbsp;</td>
                                    <td class="style43">
                                        &nbsp;</td>
                                    <td>
                                        &nbsp;</td>
                                </tr>
                                <tr>
                                    <td class="style34">
                                        <asp:Button ID="saveModify" OnClick="saveChangesModify" runat="server" 
                                            Text="Save" Width="42px" />
                                    </td>
                                    <td class="style43">
                                        &nbsp;</td>
                                    <td>
                                        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </td>
                </tr>
                <tr>
                    <td class="style28">
                        &nbsp;</td>
                    <td class="style28">
                        &nbsp;</td>
                </tr>--%>
            </table>
        </asp:View>
    <asp:View ID="addGame" runat="server">
        <table style="width:91%;">
            <tr>
                <td class="style18" colspan="2">
                    <h1 class="style8">
                        Add New Game</h1>
                </td>
            </tr>
            <tr>
                <td style="background-color:lightgreen;" align="center" colspan="3" valign="middle">
                    Game Name</td>
            </tr>
            <tr valign="top">
                <td style="background-color:lightgreen;" align="center" colspan="3" valign="middle">
                    &nbsp;<asp:TextBox ID="gameNameAddTxt" runat="server"></asp:TextBox><br />
                    <asp:Label ID="lblError1" runat="server" ForeColor="Red"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="background-color:lightgreen;width:33%" align="center">
                    <asp:GridView ID="gvSystemList" runat="server" AutoGenerateColumns="False"
                        CellPadding="4" ForeColor="#333333" GridLines="None" Width="347px">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="Select System">
                            <ItemTemplate>
                            <asp:CheckBox ID="chkSelect" runat="server" />
                            </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="SystemID" HeaderText="System ID" />
                            <asp:BoundField DataField="SystemName" HeaderText="System Name" />
                        </Columns>
                        <EmptyDataTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </EmptyDataTemplate>
                        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <SortedAscendingCellStyle BackColor="#FDF5AC" />
                        <SortedAscendingHeaderStyle BackColor="#4D0000" />
                        <SortedDescendingCellStyle BackColor="#FCF6C0" />
                        <SortedDescendingHeaderStyle BackColor="#820000" />
                    </asp:GridView><br />
                    <asp:Label ID="lblError2" runat="server" ForeColor="Red"></asp:Label>
                </td>
                <td style="background-color:lightgreen;width:33%" align="center">
                     <asp:GridView ID="gvGoals" runat="server" AutoGenerateColumns="False"
        CellPadding="4" ForeColor="#333333" GridLines="None" Width="355px">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:TemplateField HeaderText="Select Goal">
                <ItemTemplate>
                    <asp:CheckBox ID="chkSelect" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="GoalID" HeaderText="Goal ID" />
            <asp:BoundField DataField="goalName" HeaderText="Goal Name" />
        </Columns>
        <EmptyDataTemplate>
            <asp:CheckBox ID="CheckBox1" runat="server" />
        </EmptyDataTemplate>
        <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
        <SortedAscendingCellStyle BackColor="#FDF5AC" />
        <SortedAscendingHeaderStyle BackColor="#4D0000" />
        <SortedDescendingCellStyle BackColor="#FCF6C0" />
        <SortedDescendingHeaderStyle BackColor="#820000" />
    </asp:GridView><br />
    <asp:Label ID="lblError3" runat="server" ForeColor="Red"></asp:Label>
                </td>
                <td style="background-color:lightgreen;width:33%" align="center">
                        <asp:Label ID="lblCreated01" runat="server" ForeColor="Red"></asp:Label><br />
                        <asp:Label ID="lblCreated02" runat="server" ForeColor="Red"></asp:Label><br />
                        <asp:Label ID="lblCreated03" runat="server" ForeColor="Red"></asp:Label><br />
                        <asp:Label ID="lblCreated04" runat="server" ForeColor="Red"></asp:Label><br />
                </td>
            </tr>
            <tr>
                <td style="background-color:lightgreen" align="center">
                    <asp:Button ID="saveAddBtn" runat="server" Text="Save"/>
                    
                </td>
                <td style="background-color:lightgreen" align="center">
                    <asp:Button ID="goalAddBtn" runat="server" Text="Save" />
                    
                </td>
                <td style="background-color:lightgreen" align="center">
                <asp:Button ID="btnCreateGame" runat="server" Text="Create Game" style="width:130px;margin:4px"/>
                </td>
            </tr>
        </table>
        </asp:View>
    </asp:MultiView>
    </form>
    </body>
</html>
